
<?php
	
	session_start();

	$username=$_SESSION['username'];
	$usersotrycount=$_POST['numberofuserstory'];
	
	//inserting into pbDB
	$pbidescription=$_POST['pbidesc'];
	$priority=$_POST['priority'];
	$estimatedtime=$_POST['estimatedtime'];
	include('connect.php');
	
	$q=mysql_query("INSERT INTO `productbacklog` 
					VALUES('','$pbidescription','','','$priority','$estimatedtime')");
	
	
 	
	$queryget1=mysql_query("SELECT * FROM productbacklog WHERE pbidescription='$pbidescription'");
	$row=mysql_fetch_assoc($queryget1);
	$numberofpbi=$row["pbiid"];
	
	
	
	
	
	
	
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by CGWORLD.ASIA

http://cgworld.asia

Name       : Wellness  
Description: A two-column, fixed-width design with dark color scheme.
Version    : 1.0
Released   : 20100110

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Wellness   by Free CSS Templates</title>
<link rel="shortcut icon"href="http://www.cgworld.asia/favicon.ico"type="image/x-icon">
<link rel="icon"href="http://www.cgworld.asia/favicon.ico"type="image/x-icon">
<link href="../style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
	<div id="header-wrapper">
	<div id="header">
		<div id="logo">
			<h1><a href="#">ALMAS   </a></h1>
			<p> design by <a href="http://www.freecsstemplates.org/">IUST students</a></p>
		</div>
	</div>
	</div>
	<!-- end #header -->
	<div id="page">
	<div id="page-bgtop">
	<div id="page-bgbtm">
		<div id="content">
			<div id="content">
		
			
				
				<h2><font size="+1"> Step 2 (Enter UserStories) >></font></h2>
	
                    
					<form name="adduserstory"  method="POST" action="addUserStorysecondpage.php">
					<table width ='500'>
					
						
							<?php
								for ($i=1 ;$i<=$usersotrycount;$i++)
								{
									?><tr><?php
									?><td>userstory <?php echo $i;?></td>
									<td><textarea name=<?php $i ?> type="text" /> </textarea></td>
									</tr><?php
								}
							
							
							
							?>
						
                      
						
					<input type="hidden" name="count" value="<?php echo $usersotrycount;?>" />
                    <input type="hidden" name="numberofpbi" value="<?php echo $numberofpbi;?>" />
                      
						
					
					
					<tr>
						
							<td align='right'>  </td>
							
                            <td align='left'><input name='button' type="submit" value="Finish"></td>
                      
						
					</tr>
					
				</table>
					
					
			
	
			
			
	
	  </div>
         
		
		
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<ul>
				<li>
					
				</li>
				
				<li>
					<h2>Categories</h2>
					<ul>
						<li><a href="#">Home</a></li>
						
						<li>you : usertest</li>
						<li>your role : Product Owner </li>
                        <li>your game :testgame </li>
                        
						<li>delete PBI</li>
						
						
						<li><a href="#">Logout</a></li>
					</ul>
				</li>
				
				
			</ul>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	</div>
	<!-- end #page -->
</div>
	
	<!-- end #footer -->
</body>
</html>
